package com.cskaoyan.controller;

import com.cskaoyan.bean.MarketLog;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 操作日志
 * @Author: JianhuaZeng
 * @Date: 2022/12/28 21:58
 */
@RestController
@RequestMapping("admin/log")
public class LogController {

    @Autowired
    LogService logService;

    /**
     * @description: 查询所有的日志
     * @param: pageInfo
     * @return: com.cskaoyan.bean.common.BaseRespVo
     * @author: JianhuaZeng
     * @date: 2022/12/30 2022/12/30
     */
    @GetMapping("list")
    public BaseRespVo list(BasePageInfo pageInfo){
        CommonData<MarketLog> logData = logService.list(pageInfo);
        return BaseRespVo.ok(logData,"成功");
    }
}
